package cn.edu.neusoft.wuguangsheng.flowerimpression.model;

import cn.edu.neusoft.wuguangsheng.flowerimpression.bean.LoginBean;
import cn.edu.neusoft.wuguangsheng.flowerimpression.iface.LoginIface;
import cn.edu.neusoft.wuguangsheng.flowerimpression.listener.TListener;
import cn.edu.neusoft.wuguangsheng.flowerimpression.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class LoginModel extends RetrofitBaseModel implements LoginIface<LoginBean> {
    private AllService allService;
    private Retrofit retrofit;
    public LoginModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }

    @Override
    public void login(String username, String password, TListener<LoginBean> tListener) {
        Call<LoginBean> call = allService.login(username,password);
        callenqueue(call,tListener);
    }
}
